package com.yqw.demo.boot;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

import com.yqw.demo.boot.config.AcmeProperties;
import com.yqw.demo.boot.config.MyConfiguration;

/**
 * Hello world!
 *
 */
@SpringBootApplication
public class Application 
{
    public static void main( String[] args )
    {
        System.out.println( "Hello World!" );
        ConfigurableApplicationContext ctc = SpringApplication.run(Application.class, args);
        System.out.println(ctc.getBean(AcmeProperties.class).toString());
        System.out.println(ctc.getBean(MyConfiguration.class).getAcmeProperties().toString());
    }
    
//    @Bean
//    public AcmeProperties acmeProperties() {
//		return new AcmeProperties();
//	}
}
